Skip to content

Adds IMU projected_gravity_b and IMU computation speed optimizations #2512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 9, 2025

Conversation

jtigue-bdai
Copy link
Collaborator

@jtigue-bdai jtigue-bdai commented May 16, 2025

Description

This PR adds projected_gravity_b data stream as well as speeding up computation by during batch rotating of all data streams to base frame in one computation rather than each data stream separately.

This PR is dependant on PR 2129 and should not be merged until that PR is merged.

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@Mayankm96
Copy link
Contributor

Can we keep quat rotate and quat apply changes to another MR? Otherwise it is getting burried here under "IMU changes" which isn't correct.

@jtigue-bdai
Copy link
Collaborator Author

Can we keep quat rotate and quat apply changes to another MR? Otherwise it is getting burried here under "IMU changes" which isn't correct.

I can, I was mainly trying to utilize the quat_apply_inverse function which was introduced in the other PR. If we want to get this in sooner I can switch to quat_apply(quat_inv(quat)).

@jtigue-bdai jtigue-bdai force-pushed the jat/feats/imu_improvements branch from e0b096e to 8067b49 Compare May 29, 2025 12:29
# default to all sensors
if len(env_ids) == self._num_envs:
env_ids = slice(None)
# obtain the poses of the sensors
pos_w, quat_w = self._view.get_transforms()[env_ids].split([3, 4], dim=-1)
quat_w = math_utils.convert_quat(quat_w, to="wxyz")
quat_w = quat_w.roll(1, dims=-1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this because convert_quat has more overhead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah there is a little bit more logic. I was trying to squeeze as much as possible out.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, how significant is the difference? wonder if it makes sense to make a more lightweight version of convert_quat maybe just for torch tensors?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it was that much different, but I don't have the numbers for that.

@kellyguo11 kellyguo11 changed the title Add IMU projected_gravity_b and IMU computation speed optimizations Adds IMU projected_gravity_b and IMU computation speed optimizations Jul 8, 2025
Copy link
Collaborator

@pascal-roth pascal-roth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@ooctipus ooctipus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kellyguo11 kellyguo11 merged commit fde5959 into isaac-sim:main Jul 9, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants